//
//  CoGeCIRenderer.h
//  CoGeOpenSource
//
//  Created by Tamas Nagy on 9/5/12.
//  Copyright (c) 2012 home. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Quartz/Quartz.h>
#import <OpenGL/OpenGL.h>
#import "CoGeTextureSource.h"
#import "CoGeRenderManager.h"

@interface CoGeCIRenderer : NSObject <CoGeTextureSource>  {
    
    CGLContextObj cgl_ctx;

    CIFilter *filter;
    
	NSSize renderSize;
	
	NSSize currentSize;
    
    CGColorSpaceRef colorSpace;
	NSString *compositionFilePath;
    
    NSString *filterName;
    
    GLuint texture;

    CIImage *currentCIImage;
    CIContext *coreImageContext;
    CGColorSpaceRef colorspace;
}

@property (retain, nonatomic) CIFilter *filter;
@property (readwrite, retain) NSString *compositionFilePath;
@property (readwrite, retain) NSString *filterName;
@property (retain) CIContext *coreImageContext;
@property (assign, nonatomic) CIImage *currentCIImage;

-(void)cleanUpOnRenderingThread;

-(id)initCoGeCIRendererWithPixelFormat:(NSOpenGLPixelFormat *)format shareContext:(NSOpenGLContext *)shareContext;

-(NSSize)renderSize;
-(void)setRenderSize:(NSSize)newSize;


@end
